#ifndef _RUNTIMEIMPL_H_
#define _RUNTIMEIMPL_H_

#include "stdafx.h"

#include "threadimpl.h"
#include "threadpoolimpl.h"

class CRunTimeImpl : public IRunTime, public IPlugin, public CUnknownImp
{
public:
    CRunTimeImpl(void);
    virtual ~CRunTimeImpl(void);

    BEGIN_STDCOM_MAP
    STDCOM_INTERFACE_ENTRY_UNKNOWN_(IRunTime)
    STDCOM_INTERFACE_ENTRY(IPlugin)
    STDCOM_INTERFACE_ENTRY(IRunTime)
    END_STDCOM_MAP

public:
    // IPlugin
    std_method(Init)(IBase* pRot, IBase* pBase);
    std_method(Uninit)();

    // IRunTime
    std_method(CreateThread)(LPCSTR name, IBase* pBase);
    std_method(StartThread)(LPCSTR name);
    std_method(StopThread)(LPCSTR name);

private:
    long m_ref;
};

#endif
